<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<jsp:include page="header.jsp" />      
    <div id="inner_wrap">
	<div id="inner_hold">
	<div id="inner">
	<div class="center_hold">
        <jsp:useBean id="warehouseManagement" class="com.aal.model.WarehouseManagement">
            <c:set target="${warehouseManagement}" property="warehouseName" value="${param.name}"/>
            <c:set target="${warehouseManagement}" property="warehouseLocation" value="${param.location}"/>
            <c:set target="${warehouseManagement}" property="warehouseDescription" value="${param.description}"/>
        </jsp:useBean>
        <c:if test="${!empty param.name && param.hidden=='create'}">
            <jsp:getProperty name="warehouseManagement" property="createWarehouse"/>
        </c:if>
        <c:if test="${!empty param.name && param.hidden=='edit'}">
            <jsp:getProperty name="warehouseManagement" property="editWarehouse"/>
        </c:if>
        <c:if test="${!empty param.name && param.hidden=='delete'}">
            <jsp:getProperty name="warehouseManagement" property="deleteWarehouse"/>
        </c:if>
        
                <form>
                <fieldset>
                <legend>warehouseManagement</legend>
                <input type="hidden" name="hidden" value="create"/>
                <label for="warehousename">warehouse Name</label>
                <input type="text" name="name" required/></br>
                <label for="warehouselocation">warehouse Location</label>
                <input type="text" name="location" required/></br>
                <label for="warehousedescription">warehouse Description</label>
                <input type="text" name="description" required/></br>
                <input type="submit" value="create warehouse"/></br>
                </fieldset>
                </form>
                <hr/>
                <form>   
                <fieldset>
                <legend>warehouseManagement</legend>              
                <input type="hidden" name="hidden" value="edit"/>
                <label for="warehousename">warehouse Name</label>
                <input type="text" name="name" required/></br>
                <label for="warehouselocation">warehouse Location</label>
                <input type="text" name="location" required/></br>
                <label for="warehousedescription">warehouse Description</label>
                <input type="text" name="description" required/></br>
                <input type="submit" value="edit warehouse"/></br>
                </fieldset>
                </form>
                <hr/>
                <form>
                <fieldset>
                <legend>warehouseManagement</legend>
                <input type="hidden" name="hidden" value="delete"/>
                <label for="warehouseName">warehouseName</label>
                <input type="text" name="name" required/></br>
                <input type="submit" value="delete warehouse"/>
                </fieldset>
                </form>
                <form>
                <fieldset>
                <legend>warehouseManagement</legend>
                <input type="hidden" name="hidden" value="view"/>
                <label for="warehousename">warehouse Name</labe>
                <input type="text" name="name" required/></br>
                <input type="submit" value="list all warehouse"/>
                </fieldset>
                </form>
                <c:if test="${!empty param.name && param.hidden=='view'}">
                    <table class="bordered">
                    <c:forEach items="${warehouseManagement.warehouseByName}" var="item">
                        <tr><td><c:out value="${item.warehouseName}"/></td>
                            <td><c:out value="${item.warehouseLocation}"/></td>
                            <td><c:out value="${item.warehouseDescription}"/></td>
                        </tr>
                    </c:forEach>
                    </table>
                </c:if>
                <hr/>
                <label for="productId">productId</label>
                <input type="text" name="productId" required/></br>
                <label for="warehouseID">warehouseId</label>
                <input type="text" name="warehouseID" required/></br>
                <label for="type">type</label>
                <input type="text" name="type" required/></br>
                <label for="quantity">quantity</label>
                <input type="text" name="quantity" required/></br>
                <label>date
                <input type="date"/><input type="time"/>
                </label></br>
                <label for="orderId">orderId</label>
                <input type="text" name="orderId" required/></br>
                <label for="employee">employeeId</label>
                <input type="text" name="employee" required/></br>
                <input type="submit" value="create warehouseIO"/>
                <hr/>
                <label for="IOID">IOID</label>
                <input type="text" name="IOID" required/></br>
                <label for="productId">productId</label>
                <input type="text" name="productId" required/></br>
                <label for="warehouseID">warehouseId</label>
                <input type="text" name="warehouseID" required/></br>
                <label for="type">type</label>
                <input type="text" name="type" required/></br>
                <label for="quantity">quantity</label>
                <input type="text" name="quantity" required/></br>
                <label>date
                <input type="date"/><input type="time"/>
                </label></br>
                <label for="orderId">orderId</label>
                <input type="text" name="orderId" required/></br>
                <label for="employee">employeeId</label>
                <input type="text" name="employee" required/></br>
                <input type="submit" value="edit warehouseIO"/>
                <hr/>
            </fieldset>
        </form>
    </div>
	</div>
	</div>
	</div>
<jsp:include page="footer.jsp" />